package org.taiolib.indicators.movingAverage;

/**
 *
 * @author Michael G. Langer
 */
public class MAStrategyFactory {
    
    public MAStrategy getMAStrategy(MovingAverageType type) {
        MAStrategy result = null;

        if ( MovingAverageType.EXPONENTIAL.equals(type) ) {
            result = new ExponentialMovingAverage();
        } else if (MovingAverageType.WEIGHTED.equals(type)) {
            result = new WeightedMovingAverage();
        } else {
            result = new SimpleMovingAverage();
        }

        return result;
    }

}
